﻿using DK.ITree;
using DK.Tree;

ITree<BinaryTreeNode<int, string>, int, string> tree = new BinaryTree<int, string>();
tree.AddAndReplace(9, "s9");
tree.AddAndReplace(4, "s4");
tree.AddAndReplace(6, "s6");
tree.AddAndReplace(7, "s7");
tree.AddAndReplace(10, "s10");
tree.AddAndReplace(11, "s11");
tree.AddAndReplace(12, "s12");
tree.AddAndReplace(5, "s5");
tree.AddAndReplace(2, "s2");
tree.AddAndReplace(3, "s3");

Console.WriteLine(tree.Get(7)?.ToString());
Console.WriteLine(tree.Remove(6)?.ToString());